package com.bdth.mixapi.api.vo;

/**
 * API所需纯消息json样式对象
 * @Date 2019-04-10
 * @Auth LGP
 */
public class CommonMessage {
    private String code;
    private String message;

    private CommonMessage(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static CommonMessage success(String message){
        return new CommonMessage("200",message);
    }

    public static CommonMessage fail(String message){
        return new CommonMessage("500",message);
    }

    public static CommonMessage message(String code, String message){
        return new CommonMessage(code,message);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
